<?php

class PipesCore_Helpers_Anchor
{
	public function factory($url, $name, array $attributes = array()) {
		$attribs = array();
		foreach ($attributes as $key => $value) {
			$attribs[] = $key . '="' . $value . '"';
		}
		return '<a href="' . htmlentities($url) . '" ' . implode(' ', $attribs) . '>' . $name . '</a>';
	}
}

